<?php

class Validated extends HttpRequestHelper
{

    public $rules = array();
    public $errmsg = "";

    function __construct()
    {
        
    }

    public function addrule($rule)
    {
        foreach ($rule as $key => $value) {
            $this->rules[$key] = $value;
        }
    }

    public function validate($key, $val)
    {
        $val = !empty($val) ? $val : $this[$key];
    }

}
